<template>
  <div class="common-layout">
    <nav>
    <h1 id="heads">漫展后台管理系统</h1>
  </nav>
    <el-container>
      <!-- 设置宽度 -->
      <el-aside :width="store.state.homeview.navBool">
        <!-- 左侧菜单 -->
        <LeftNav></LeftNav>
      </el-aside>
      <el-container>
        <el-header>
          <!-- 右侧头部 -->
          <TopRightNav></TopRightNav>
        </el-header>
        <el-header id="bread">
          <BreadCrumb></BreadCrumb>
        </el-header>
        <el-main>
          <!-- 配置路由出口 -->
          <router-view></router-view>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script setup lang="ts">
// 引入左侧导航栏
import LeftNav from '@/components/LeftNav.vue';
import { useStore } from 'vuex';
import TopRightNav from '../components/TopRightNav.vue'
// 面包屑
import BreadCrumb from '@/components/BreadCrumb.vue';

const store = useStore()


</script>

<style lang="scss">
.common-layout{
    .el-aside{
        background-color: rgb(84,92,100);
        // 右侧点击时可以让左边的宽度缩小
        width: auto;
    }
    .el-header{
        background-color: #EFF2F7;
    }
    #bread{
      background-color: #fff;
      line-height: 100px;
    }
    .el-main{
        background-color: #fff;
    }
}

nav {
    padding-top: 20px;
    padding-bottom: 10px;
    #heads{
      font-size: 30px;
      text-align: center;
    }
}

// 高度自适应
.el-aside,.el-container,.common-layout,#app,body,html{
  height: 100%;
}
</style>